package com.education.teach.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.education.teach.mvp.contract.MyCoursewareActivityContract;
import com.education.teach.mvp.model.MyCoursewareActivityModel;


@Module
public class MyCoursewareActivityModule {
    private MyCoursewareActivityContract.View view;

    /**
     * 构建MyCoursewareActivityModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MyCoursewareActivityModule(MyCoursewareActivityContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MyCoursewareActivityContract.View provideMyCoursewareActivityView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MyCoursewareActivityContract.Model provideMyCoursewareActivityModel(MyCoursewareActivityModel model) {
        return model;
    }
}